package jp.dev7.enchant.tot.controller.test;

import java.util.HashMap;

import jp.dev7.enchant.tot.controller.AbsJsonpController;
import jp.dev7.enchant.tot.model.test.Foo;

import org.slim3.datastore.Datastore;

import com.google.appengine.repackaged.com.google.common.collect.Maps;

public class PostMessageController extends AbsJsonpController {

    @Override
    protected Object exec() throws Exception {
        Foo foo = new Foo();
        foo.setMessage(asString("message"));
        Datastore.put(foo);
        
        HashMap<String, Object> result = Maps.newHashMap();
        result.put("status", "OK");
        return result;
    }

}
